home *** CD-ROM | disk | FTP | other *** search
/ MacGames Sampler / PHT MacGames Bundle.iso / MacSource Folder / Samples from the CD / Editors / emacs / Emacs-1.14b1 / lisp / mac / Events.el < prev    next >
Encoding:
Text File  |  1994-02-28  |  1.3 KB  |  60 lines  |  [TEXT/EMAC]

  1. ;;;
  2. ;;; This file is part of a Macintosh port of GNU Emacs.
  3. ;;;
  4. ;;; GNU Emacs is distributed in the hope that it will be useful,
  5. ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  6. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  7. ;;; GNU General Public License for more details.
  8. ;;;
  9.  
  10. (c:defstruct EventRecord ((short what)
  11.                           (long message)
  12.                           (long when)
  13.                           (Point where)
  14.                           (short modifiers)))
  15.  
  16. (defconst nullEvent 0)
  17. (defconst mouseDown 1)
  18. (defconst mouseUp 2)
  19. (defconst keyDown 3)
  20. (defconst keyUp 4)
  21. (defconst autoKey 5)
  22. (defconst updateEvt 6)
  23. (defconst diskEvt 7)
  24. (defconst activateEvt 8)
  25. (defconst osEvt 15)
  26.  
  27. (defconst mDownMask 2)
  28. (defconst mUpMask 4)
  29. (defconst keyDownMask 8)
  30. (defconst keyUpMask 16)
  31. (defconst autoKeyMask 32)
  32. (defconst updateMask 64)
  33. (defconst diskMask 128)
  34. (defconst activMask 256)
  35. (defconst highLevelEventMask 1024)
  36. (defconst osMask -32768)
  37.  
  38. (defconst activeFlag 1)
  39. (defconst btnState 128)
  40. (defconst cmdKey 256)
  41. (defconst shiftKey 512)
  42. (defconst alphaLock 1024)
  43. (defconst optionKey 2048)
  44. (defconst controlKey 4096)
  45.  
  46. (defconst charCodeMask 255)
  47.  
  48. ; pascal Boolean WaitMouseUp(void)
  49. ;  = 0xA977; 
  50. (deftrap WaitMouseUp ("a977")
  51.   nil
  52.   char)
  53.  
  54. ; pascal void GetMouse(Point *mouseLoc)
  55. ;  = 0xA972; 
  56. (deftrap GetMouse ("a972")
  57.   ((mouseLoc address))
  58.   nil)
  59.  
  60.